<?php

namespace app\admin\controller;

use app\base\controller\base;
use think\Db;
use think\Config;
use think\facade\Env;

class System extends base
{
    public function pullAndRestart()
    {
        $name = request()->param();
        $path = Env::get('root_path');
        $file_path = $path.'test.sh';
        if(file_exists($file_path)){
            exec($file_path,$output);
            echo $file_path;
            return $this->returnJson(1001,'成功',$output);
        }else{
            echo 'no';
            return $this->returnJson(1002,'没有找到文件');
        }




    }


}
